// 封装频道组件
import $axios from '@/utils/request'

/**
 * @description: 获取频道列表
 * @param 无
 * @return
 */
export const getChannels = () => {
  return $axios({
    method: 'GET',
    url: '/v1_0/user/channels'
  })
}

/**
 * @description: 获取所有频道
 * @param {*}
 * @return {*}
 */
export const getChannelList = () => {
  return $axios({
    method: 'GET',
    url: '/v1_0/channels'
  })
}

/**
 * @description: 更新频道
 * @param {*}
 * @return {*}
 */
export const updateChannel = data => {
  return $axios({
    method: 'PUT',
    url: '/v1_0/user/channels',
    data
  })
}
